package router

import (
	"github.com/gin-gonic/gin"
	"project/internal/rpc"
)

// Router 定义路由接口
type Router interface {
	Route(r *gin.Engine)
}

// 路由Router列表注册
var routers []Router

func Register(args ...Router) {
	routers = append(routers, args...)
}

func InitRouter(r *gin.Engine) {
	for _, ro := range routers {
		ro.Route(r)
	}
}

func InitUserGrpc() {
	rpc.InitUserGrpcClient()
}
